<template>
	<page-meta><navigation-bar :title="title" front-color="#000000" background-color="#ffffff" /></page-meta>
	<view>
		<iframe :src="url" frameborder="0" style="width: 100%;position: fixed;height: 100%;overflow: auto;"></iframe>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title:'',
				url:'',
				content:''
			}
		},
		methods: {
			getdata(){
			// 	var _this = this;
			// 	uni.request({
			// 		method: 'GET',
			// 		url: _this.url,
			// 		success: function(data) {
			// 			data = data.data;
						
			// 			if(data.code == 200){
			// 				// console.log(data.data)
			// 				var decodeHtml = HtmlUtil.htmlDecodeByRegExp(data.data.fbody);
			// 				console.log(decodeHtml)
			// 				_this.content = decodeHtml;
			// 				// console.log(_this.content)
			// 			}
						
			// 		}
			// 	});
			}
		},
		onShow() {
			var _this = this;
			uni.getNetworkType({
				success: function(res) {
					if (res.networkType == 'none') {
						uni.showToast({
							title: '当前无网络连接，请检查！',
							icon: 'none',
							duration: 5000
			
							// position:'top'
						});
					}
				}
			});
			uni.onNetworkStatusChange(function(res) {
				if (!res.isConnected) {
					uni.showToast({
						title: '当前无网络连接，请检查！',
						icon: 'none',
						duration: 3000
						// position:'top'
					});
				} else {
					uni.showToast({
						title: '网络已连接！',
						icon: 'none',
						duration: 3000
						// position:'top'
					});
					_this.getdata();
				}
			});
			this.height = uni.getSystemInfoSync().windowHeight;
			this.width = uni.getSystemInfoSync().windowWidth;
			_this.getdata();
		},
		onLoad(e) {
			this.url = e.url;
			this.title = e.title;
		}
	}
</script>

<style>

</style>
